#include <QApplication>
#include <QMessageBox>
#include <QTranslator>
#include <QLocale>
#include "mainwindow.h"
#include "solver.h"

int main(int argc, char **argv)
{
    QApplication app(argc, argv);
    QTranslator appTranslator;
    appTranslator.load("bananahead_" + QLocale::system().name(),
                       app.applicationDirPath());
    app.installTranslator(&appTranslator);
    if(!solver::ReadDictionary("dictionary.txt"))
    {
         QMessageBox msgBox;
         msgBox.setText(QObject::tr("No dictionary found"));
         msgBox.exec();
         return -1;
    }
    MainWindow main;
    main.resize(320, 200);
    main.show();
    return app.exec();
}

